home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXT Education Software Sampler 1992 Fall
/
NeXT Education Software Sampler 1992 Fall.iso
/
SoundAndMusic
/
cmix
/
lib
/
evp.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-02-25
|
315b
|
18 lines
float evp(nsample,f1,f2,q)
long nsample;
float *f1,*f2,*q;
{
register jloc;
float far = (float)(nsample)/ *q;
if( far > *(q+1)) {
jloc = (1. - ((far - *(q+1))/ *(q+4))) * *(q+3);
return(*(f2+jloc));
}
else
if(far >= *(q+2)) return(1.);
else {
jloc = far * *(q+3)/ *(q+2);
return(*(f1+jloc));
}
}